import React from 'react'
import { StyleSheet, View, Text } from 'react-native'
import Divide from '../commonComponents/divide'
export default () => {
  return (
    <View style={styles.root}>
      <Text style={{ color: 'orange', fontSize: 20, textAlign: 'center' }}>
        7_3TextDemo
      </Text>

      <Divide />
      <Text style={styles.txt}>本次 qimokaoshi</Text>

      <Divide />
      <Text style={styles.normal}>本次 qimokaoshi</Text>

      <Divide />
      <Text style={styles.normal} numberOfLines={1} ellipsizeMode="tail">
        numberOfLines={1} numberOfLines={1}
      </Text>

      <Divide />
      <Text style={styles.normal} selectable={true} selectionColor={'#c0c'}>
        selectable={String(true)} selectionColor={'#c0c'}
      </Text>

      <Divide />
      <Text
        style={[styles.normal, { backgroundColor: '#ccc' }]}
        onPress={() => {
          console.log('点击了')
        }}
        onLongPress={() => {
          console.log('长按点击了')
        }}>
        （ onPress && onLongPress ）事件
      </Text>

      <Divide />
      <Text style={styles.normal} allowFontScaling={true}>
        allowFontScaling={String(true)} 是否跟随系统
      </Text>

      <Divide />
      <Text
        style={[
          styles.normal,
          { textDecorationLine: 'underline', textDecorationStyle: 'solid' }
        ]}>
        本次期末考时不及格人数
        <Text style={{ fontSize: 18, color: 'red' }}>9</Text>
      </Text>
    </View>
  )
}

const styles = StyleSheet.create({
  root: {
    width: '100%',
    height: 'auto',
    backgroundColor: '#F0F0F0'
  },
  normal: {
    fontSize: 26
  },
  txt: {
    fontFamily: 'pop字体',
    fontSize: 40,
    color: '#3025ff',
    textShadowColor: '#A0A0A0',
    textShadowOffset: { width: 2, height: 4 },
    textShadowRadius: 6
  }
})
